#!/bin/sh
var="$1"
#open() {
	#if [ "$1" = "true" ];then
		#defaultbrowser "$var"
	#else
		#defaulttexteditor "$var"
	#fi
#}
export gui='<window title="Open with..">
	<vbox>
		<text><label>Choose the program to open '${var##*/}'</label></text>
		<radiobutton>
			<label>Editor</label>
			<variable>T</variable>
		</radiobutton>
		<radiobutton>
			<label>Browser</label>
			<variable>B</variable>
		</radiobutton>
		<hbox><button ok></button></hbox>
	</vbox>
</window>'
eval `gtkdialog -p gui`
case "$B" in "true")defaultbrowser "$var";;*)defaulttexteditor "$var";;esac

